const { defineConfig } = require('@vue/cli-service');
module.exports = defineConfig({
    transpileDependencies: true,
    lintOnSave:false,
    configureWebpack: {    
        resolve: { extensions: [".ts", ".tsx", ".js", ".json"] },    
        module: {        
          rules: [    
            {    
              test: /\.tsx?$/,    
              loader: 'ts-loader',    
              exclude: /node_modules/,    
              options: {
                appendTsSuffixTo: [/\.vue$/],    
              }    
            }        
          ]    
        }    
      }
    ,
    devServer: {
        port:8081, 
        proxy: {
            '/api': {
                target: 'http://localhost:8080',//这里填入你要请求的接口的前缀
                ws: true,//代理websocked
                changeOrigin: true,//虚拟的站点需要更管origin
                secure: true,                   //是否https接口
                pathRewrite: {
                    '^/api': ''//重写路径
                }
            }
        }
    }
})